package cn.lanchengkeji.datafillingsystem.service;





import cn.lanchengkeji.datafillingsystem.common.ResponseBean;
import cn.lanchengkeji.datafillingsystem.entity.Users;
import cn.lanchengkeji.datafillingsystem.vo.ExportUserListVO;
import cn.lanchengkeji.datafillingsystem.vo.ExportWebUserListVO;
import cn.lanchengkeji.datafillingsystem.vo.UsersVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * <p>
 * 用户 服务类
 * </p>
 *
 * @author Yixu
 * @since 2018-11-29
 */
public interface IUsersService extends IService<Users> {
    /**
     * 添加用户
     *
     * @param users
     * @return
     * @throws Exception
     * @author yuhao
     * @version 2018-12-05 11:52
     */
    public boolean insertUsers(UsersVO users) throws Exception;

    /**
     * 修改用户
     *
     * @param users
     * @return
     * @throws Exception
     * @author yuhao
     * @version 2018-12-05 11:52
     */
    public ResponseBean updateUsers(UsersVO users) throws Exception;

    /**
     * 修改用户
     *
     * @param users
     * @return
     * @throws Exception
     * @author yuhao
     * @version 2018-12-05 11:52
     */
    public ResponseBean updateWebUsers(UsersVO users) throws Exception;

    /**
     * 用户未登录状态下修改用户信息
     *
     * @param users
     * @return
     * @throws Exception
     */
    public ResponseBean updateUsersByUserName(UsersVO users) throws Exception;

    /**
     * 删除用户
     *
     * @param users 根据id删除菜单
     * @return
     * @throws Exception
     * @author yuhao
     * @version 2018-12-05 11:52
     */
    public ResponseBean deleteUsers(Users users) throws Exception;

    /**
     * 查看单个用户
     *
     * @param users
     * @return
     * @author yuhao
     * @version 2018-12-05 11:52
     */
    public Users selectOneUsers(UsersVO users) throws InvocationTargetException, IllegalAccessException;

    /**
     * 分页查看用户
     *
     * @param page      分页器
     * @param condition 查询条件
     * @return
     * @author yuhao
     * @version 2018-12-05 11:52
     */
    public Page<UsersVO> pageUsers(Page<UsersVO> page, UsersVO condition);

    public Page<UsersVO> pageWebUsers(Page<UsersVO> page, UsersVO condition);

    /**
     * 审核列表
     *
     * @param page
     * @param condition
     * @return
     */
    public Page<UsersVO> pageCheckUsers(Page<UsersVO> page, UsersVO condition);

    /**
     * 通过userName查找用户
     *
     * @param userName
     * @return
     */
    public Users getUserByName(String userName);

    /**
     * 根据角色id查询用户
     *
     * @param roleId
     * @return
     * @author yuhao 2018-12-07 15:56
     */
    public List<Users> selectUsersByRoleId(Integer roleId);

    /**
     * 查看单个用户
     *
     * @param users
     * @return
     * @throws InvocationTargetException
     * @throws IllegalAccessException
     */
    public Users selectUserInfo(UsersVO users);

    public List<ExportUserListVO> getExportUserListVO();

    public List<ExportWebUserListVO> getExportWebUserListVO();

}
